package main

import (
	"fmt"
	"os"
)

func main() {
	list := os.Args
	if len(list) == 1 {
		fmt.Println("无内容")
		return
	}
	fileName := list[1]

	info, err := os.Stat(fileName)//Stat获取文件属性
	if err != nil {
		fmt.Println("os.Stat err =",err)
		return
	}

	fmt.Println("name =",info.Name())
	fmt.Println("size =",info.Size())
	fmt.Println("mode =",info.Mode())
	fmt.Println("modtime =",info.ModTime())
	fmt.Println("isDir =",info.IsDir())
	fmt.Println("sys =",info.Sys())
}

